<template>
    <h1>用户登录列表页面</h1>

    <table>
        <thead>
            <tr>
                <th>账号ID</th>
                <th>账号</th>
                <th>密码</th>
                <th>注册时间</th>
            </tr>
        </thead>

        <tbody>
            <tr v-for="item in Info" >
                <td>{{ item.L_Id }}</td>
                <td>{{ item.L_Name }}</td>
                <td>{{ item.L_Pwd.substring(0,4)+'***' }}</td>
                <td>{{ item.L_Date.substring(0,10) }}</td>
            </tr>
        </tbody>

    </table>

</template>

<script setup lang="ts">
import { ref,onMounted } from 'vue';
import axios from 'axios';

const Info = ref([{
    L_Id:'',
    L_Name:'',
    L_Pwd:'',
    L_Date:''
}])

onMounted (()=>{
    UserShow();
})

const UserShow = ()=>{
    axios({
        method:'get',
        url:'http://localhost:61480/api/Regoin/UserShow',
    })
    .then((res)=>{
        console.log(res);
        Info.value = res.data;
    })
    .catch((err)=>{
        console.log(err);
    })
}


</script>